//充电桩相关接口
import api from '@/api/api'

// 查询充电站分布情况
const reqStationData = () => {
	return api.get('/dashboard/station/distribution')
}


// 统计充电站-桩统计信息(地图表格上面的数据)
const reqStationNum = () => {
	return api.get('/dashboard/station/count')
}
// // 统计充电站-桩统计信息(地图表格上面的数据)
// const reqStationList = (stationName) => {
// 	return api.get(`/dashboard/station/total?stationName=${stationName}`)
// }

// 充电站收益排名信息
const reqIncomeRanking = (type = 3) => {
	return api.get(`/dashboard/station/earnings?sort=1&type=${type}`)
}
// 按照充电站分组统计充电度数数据
const reqDegree = (type = 3) => {
	return api.get(`/dashboard/order/degree/count?type=${type}`)
}

// 按照充电站分组统计订单数量
const reqOrder = (type = 3) => {
	return api.get(`/dashboard/order/count?type=${type}`)
}



// 充电桩的列表
const reqCharge = (data) => {
	return api.get(`/charging/page`, data)
}

// 充电桩告警接口
const reqChargeAlarm = (data) => {
	return api.post(`/alarm/page`, data)
}

// 充电桩详情接口
const reqChargeDetail = (id) => {
	return api.get(`/charging/${id}`)
}
const apiArr = [{
		value: 'reqStationData',
		method: 'get'
	},

	{
		value: 'reqStationNum',
		method: 'get'
	},
	{
		value: 'reqIncomeRanking',
		method: 'get'
	},
	{
		value: 'reqDegree',
		method: 'get'
	},
	{
		value: 'reqOrder',
		method: 'get'
	},
]
export {
	reqStationData,
	reqStationNum,
	reqIncomeRanking,
	reqDegree,
	reqOrder,
	reqCharge,
	reqChargeAlarm,
	reqChargeDetail,
	apiArr
}